﻿<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <Header>
    <Title>ReturnArithBaseResult</Title>
    <Author>jinlei</Author>
    <Shortcut>ReturnArithBaseResult</Shortcut>
    <Description>ReturnArithBaseResult</Description>
    <SnippetTypes>
      <SnippetType>SurroundsWith</SnippetType>
      <SnippetType>Expansion</SnippetType>
    </SnippetTypes>
  </Header>
  <Snippet>
    <Code Language="CSharp">
      <![CDATA[var result = new ArithNodeBaseResult(_parameter.uId);

            CheckModuleValid();
            DisposeResultImage();
            ResultImage = new GvImage(Image.GetWidth(), Image.GetHeight(), GetGvImagePixelFormat(PixelFormat.Format1bppIndexed));

            #region 调用算子
            try
            {
                _module.SetParamter(_gvPara);
                SetImage();
                SetResultImage();
                _module.Execute();
            }
            catch (Exception ex)
            {
                result.ExecuteSuccess = false;
                result.ExecuteMsg = Utilitys.GetInnerExceptionMsg(ex);
            }
            #endregion

            return result;]]>
    </Code>
  </Snippet>
</CodeSnippet>